From 916c512bf5a31041ac87296e1382f84c9367b955 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 14 Feb 2022 17:16:53 +0100 Subject: chore: display initial posts, thematics & topics By fetching the data in getStaticProps, I can display the data even for users with Javascript disabled. --- src/pages/thematique/[slug].tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/pages/thematique/[slug].tsx') diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index 166e0bb..d737ea7 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -5,6 +5,7 @@ import Sidebar from '@components/Sidebar/Sidebar'; import Spinner from '@components/Spinner/Spinner'; import { RelatedTopics, ThematicsList, ToC } from '@components/Widgets'; import { + getAllThematics, getAllThematicsSlug, getThematicBySlug, } from '@services/graphql/queries'; @@ -23,7 +24,10 @@ import { useRef } from 'react'; import { useIntl } from 'react-intl'; import { Article, Graph, WebPage } from 'schema-dts'; -const Thematic: NextPageWithLayout = ({ thematic }) => { +const Thematic: NextPageWithLayout = ({ + thematic, + allThematics, +}) => { const intl = useIntl(); const relatedTopics = useRef([]); const router = useRouter(); @@ -151,6 +155,7 @@ const Thematic: NextPageWithLayout = ({ thematic }) => { >